-- GENERATED SPELL FOR [Korv] --


function spell0_16053(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16053', 612, 1)
end

function spell1_16053(pUnit, Event) --@Earthbind Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(15786,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_16053', 1, 1)
end

function spell2_16053(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(21401,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16053', 8288, 1)
end

function spell3_16053(pUnit, Event) --@Lesser Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(27624,pUnit)
pUnit:RegisterEvent('Sorts_16053', 1500, 1)
end

function spell4_16053(pUnit, Event) --@Purge,n/a--
pUnit:FullCastSpellOnTarget(27626,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16053', 645, 1)
end

function spell5_16053(pUnit, Event) --@Windfury Totem,Self--
pUnit:FullCastSpellOnTarget(27621,pUnit)
pUnit:RegisterEvent('Sorts_16053', 640, 1)
end

function Sorts_16053(pUnit, Event)
local choix_sorts_16053 = math.random(0, 5)
if choix_sorts_16053 == 0 then
pUnit:RegisterEvent('spell0_16053', 1, 1)
end
if choix_sorts_16053 == 1 then
pUnit:RegisterEvent('spell1_16053', 1, 1)
end
if choix_sorts_16053 == 2 then
pUnit:RegisterEvent('spell2_16053', 1, 1)
end
if choix_sorts_16053 == 3 then
pUnit:RegisterEvent('spell3_16053', 1, 1)
end
if choix_sorts_16053 == 4 then
pUnit:RegisterEvent('spell4_16053', 1, 1)
end
if choix_sorts_16053 == 5 then
pUnit:RegisterEvent('spell5_16053', 1, 1)
end
end

function mob16053_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16053', math.random(1500, 3000), 1)
end

function mob16053_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16053_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16053_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16053, 1, 'mob16053_Action')
RegisterUnitEvent(16053, 2, 'mob16053_Leave')
RegisterUnitEvent(16053, 3, 'mob16053_Kill')
RegisterUnitEvent(16053, 4, 'mob16053_Die')
